﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Frame.Lib.Data;

namespace Cms.Entity.Traffic
{
    public partial class IPTraficInfo : EntityBase
    {
        public override string GetTableName()
        {
            return "c_IPTrafic";
        }
        public override string GetInsertSql()
        {
            return "insert into c_IPTrafic ( [ID], [IP], [InputTime]) values ( @ID, @IP, @InputTime)";
        }
        public override string GetUpdateSql()
        {
            return "update c_IPTrafic set  [IP] = @IP, [InputTime] = @InputTime where ID = @ID";
        }
        /// <summary>
        /// 
        /// </summary>
        public Guid ID
        {
            get;
            set;
        }
        /// <summary>
        /// 来源IP地址
        /// </summary>
        public String IP
        {
            get;
            set;
        }
        /// <summary>
        /// 访问时间
        /// </summary>
        public DateTime InputTime
        {
            get;
            set;
        }
        public override void SetValue(string key, object value)
        {
            key = key.ToLower();
            switch (key)
            {
                case "id":
                    this.ID = (Guid)value;
                    break;
                case "ip":
                    this.IP = (String)value;
                    break;
                case "inputtime":
                    this.InputTime = (DateTime)value;
                    break;
            }
        }
        public override object GetValue(string key)
        {
            key = key.ToLower();
            switch (key)
            {
                case "id":
                    return this.ID;
                case "ip":
                    return this.IP;
                case "inputtime":
                    return this.InputTime;
                default:
                    return null;
            }
        }
    }


}
